<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

// Load the tooltip behavior.
JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('behavior.modal');
JHtml::_('formbehavior.chosen', 'select');
		$db	 = &JFactory::getDBO();
		$user   = & JFactory::getUser();
	    $uid  	= $user->get('id');
		$query = $db->getQuery(true);
		// Select all records from the user profile table where key begins with "custom.".
		// Order it by the ordering field.
		$query->select('wellcome');
		$query->from('#__user_profiles');
		$query->where('user_id='.$uid);
		// Reset the query using our newly populated query object.
		$db->setQuery($query);
		$results = $db->loadObjectList();
		foreach($results as $row){
			$wellcome = $row -> wellcome;
		}
?>

<form action="<?php echo JRoute::_('index.php?option=com_profiles&task=saveWellcome');?>" method="post" name="adminForm" id="adminForm">
	<h1>Wellcome</h1>
    <?php
		$editor =& JFactory::getEditor();
		$params = array( 'smilies'=> '0' ,
						 'style'  => '1' ,  
						 'layer'  => '0' , 
						 'table'  => '0' ,
						 'clear_entities'=>'0'
						 );
		echo $editor->display( 'desc', $wellcome, '100%', '400', '20', '20', false, $params );
    ?>
    <input type="submit" value="Save" name="btnSave" />
</form>
